home *** CD-ROM | disk | FTP | other *** search
- %case window field%
- %fieldname%:% %integer;
- %case create%
- %fieldname% := 1;
- %case mousein%
- bounds := GetWRect (%itemname%);
- if PtInRect (where, bounds) then begin
- TrackPopup (bounds, %popupID%, %fieldName%);
- end;
- %case update%
- bounds := GetWRect (%itemname%);
- UpdatePopup (bounds, %popupID%, %fieldName%);
- %case itemNr%
- %DefineItem%
- %case dialog field%
- %fieldname%:% %integer;
- %haveField%
- %case init field%
- %fieldname% := 1;
- %case auxiliary%
- %set needsRefCon = true%
- {----------}
- Procedure Draw%Itemname%% %(whichDialog: DialogPtr;
- itemNr: integer);
- var
- data: %dlogname%RecPtr;
- Begin
- data := %dlogname%RecPtr (GetWRefCon (whichDialog));
- DrawPopup (itemNr, %popupID%, data^.%fieldName%);
- End; {Draw%Itemname%}
-
- %case set%
- SetUserItem (%Itemname%, @Draw%Itemname%);
- %case hit%
- %itemname%: begin
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- DoPopup (%itemname%, %popupID%, %fieldname%);
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- %if menuName = Sound%
- PlaySound (%menuName%Menu, %fieldname%);
- %endif%
- end;
- %case finish%